include ../../support/include.mk

PRIV_FILES=../../priv/ext_spectrometer.o ../../priv/GDAL_drv.so

all: $(EBIN_FILES) $(PRIV_FILES)

debug:
	$(MAKE) DEBUG=-DDEBUG

clean:
	rm -rf $(EBIN_FILES)
	rm -rf $(PRIV_FILES)

test: 
	$(ERL) -noshell -pa ../../ebin -s e2d_test -s init stop
	
../../priv/ext_spectrometer.o:
	$(CC) $(OS_DF) -I$(ERL_HOME)/lib/erl_interface-3.5.9/include/ -L$(ERL_HOME)/lib/erl_interface-3.5.9/lib/ spectrometer.c spectrometer_ei.c erl_comm.c -lerl_interface -lei -lpthread -lgdal -o $@

../../priv/GDAL_drv.so:
	$(CC) $(OS_DF) GDAL_drv.c spectrometer.c -I/usr/local/lib/erlang/usr/include/ -fpic -shared -lpthread -lgdal -o $@
	